﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Flickr2Frame
{
    public partial class ConfirmDelete : Form
    {
        public bool HideFutureWarnings
        {
            get
            {
                return showCheckBox.Checked;
            }
        }        
    
        public ConfirmDelete(string deleteDirectory)
        {
            InitializeComponent();
            iconPictureBox.Image = global::Flickr2Frame.Properties.Resources.Warning;
            warningLabel.Text = "All files and folders in the following directory are about to be deleted:\r\r\t" + deleteDirectory + "\r\rPlease confirm that you want to continue by ticking the box below.\r\rOnce these files have been deleted, there is no way to recover them.\r\rPLEASE ENSURE ALL FILES IN " + deleteDirectory + " HAVE BEEN BACKED UP PRIOR TO ACKNOWLEDGING THIS DISCLAIMER.";
            deleteCheckBox.CheckedChanged += new EventHandler(deleteCheckBox_CheckedChanged);
            okButton.Click += new EventHandler(okButton_Click);
        }

        void okButton_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        void deleteCheckBox_CheckedChanged(object sender, EventArgs e)
        {
            if (deleteCheckBox.Checked)
            {
                okButton.Enabled = true;
                showCheckBox.Enabled = true;
            }
            else
            {
                okButton.Enabled = false;
                showCheckBox.Enabled = false;
            }
        }
    }
}
